Use detecting circuit

ABSTRACT

The invention relates to a circuit to detect the use of an element of an integrated circuit. According to the invention, the circuit ( 100 ) comprises:  
     a non-volatile electrically programmable storage circuit ( 116 ) and  
     a programming circuit ( 110 ) to partially program said storage circuit and gradually modify its programming level as and when the element is used, so that this level represents the number of uses of the element.

[0001] An object of the invention is a use detection circuit for an integrated circuit element producing or using a data that is sensitive in terms of security. More specifically, the invention is aimed at reporting the wrongful use of an element of an integrated circuit producing or using a sensitive data. The invention is particularly valuable for integrated circuits for smart cards that produce or use data which is to be kept secret, but it can also be used for any integrated circuit element using sensitive data that is to be protected from the exterior of the circuit.

[0002] The sensitive data elements are, for example, personal data identifying the owner or manufacturer of the integrated circuit, keys, initials or derivatives, data encryption algorithms etc. They are produced or used for example by elements of the integrated circuit.

[0003] The term integrated circuit “element” has to be understood herein and in the rest of the document in the broad sense of the term. An “element” designates for example an identification circuit or else a cryptographic computation circuit of the integrated circuit or even simply a part of one of these circuits. The term “element” also designates an instruction, a particular sequence of instructions or a step of a method that is implemented by the integrated circuit and which, during its execution, leads to the production or use of a sensitive data.

[0004] Known snooping techniques make use of the correlation between the use of a sensitive data and the changes undergone by a physical variable inherent to the integrated circuit and measurable from outside the circuit. A variable of this kind may be, for example, the total energy consumption of the circuit or else its electromagnetic radiation.

[0005] To access a sensitive data from outside the circuit, a snooper activates the operation of an element that produces or uses this sensitive data, measures a physical variable accessible from the exterior and searches for the correlation between this variable and the sensitive data.

[0006] One of the main difficulties for the snooper lies in the fact that the measurement of the variable is particularly difficult because it is generally noise-ridden, the physical variable being produced by the entire integrated circuit and not solely by the elements producing or manipulating the sensitive data. The snooping user then needs to have a large number of identical measurements at his disposal, for example about 2000 to 20 000 measurements, to remove the noise from the measurement and succeed in his operation.

[0007] To prevent such attack, the legitimate user may take preventive action if an element producing or using the sensitive data is subjected to excessively frequent action: he may for example disable the operation of the element, i.e. disable the operation of the circuit, the part of the circuit, the instruction or the particular series of instructions that produces or uses the sensitive data. The legitimate user may also act preventively by replacing the sensitive data element or elements by other data element if there is provision for substitution data, or else by modifying the mechanism for the production of these data.

[0008] For this purpose, the legitimate user must be able to know how many times the element producing or using the sensitive data has been used, or he must have at least an estimate of this number, to find out whether or not the element is being used wrongfully. He may deem this to be the case when the number of uses or the estimate of this number has reached a chosen value N, for example 1000 or 10,000; he can then take preventive action by blocking the operation of the integrated circuit, preventing the production or use of the sensitive data to be protected, or else again by modifying the value of this sensitive data.

[0009] There are existing solutions that generally use a counter to determine the number of productions or uses of the element using the sensitive data. However, one drawback of the use of a counter is that a large-sized memory cell is needed if it is desired to store the number produced by the counter when this number is great. The surface and the consumption of the counter itself, as well as the time needed to program the counter, may also be non-negligible, especially if the number produced by this counter is great. Furthermore, if the counter has resetting means available, then these means are generally quite easily accessible, from outside the circuit, to a snooper who will then easily be able to erase the contents of the counter.

[0010] In view of the drawbacks of presently-used solutions, it is an aim of the invention to make a use detection circuit that indicates the number of uses of an element producing or using a sensitive data and, as the case may be, reports the crossing of a maximum number of uses, this maximum number being defined by the user.

[0011] Another aim of the invention is to make a detection circuit whose size is limited in terms of silicon surface area.

[0012] Another aim of the invention is to make a detection circuit that is fast.

[0013] Another aim of the invention, finally, is to make a use detection circuit that preserves a trace of the past history of the element with which it is connected and cannot be erased or reset in a simple way.

[0014] With these goals in view, an object of the invention is a circuit for the detection of the use of a sensitive element of an integrated circuit, the detection circuit comprising:

[0015] a non-volatile electrically programmable storage circuit and

[0016] a programming circuit to partially program said storage circuit and gradually modify its programming level as and when the sensitive element is used, so that this level represents the number of uses of the sensitive element. The circuit of invention thus gives the desired indication.

[0017] It may be recalled here, and hereinafter, that an element may be a circuit or a part of a circuit that produces or uses a sensitive data to be protected. An element may also be an instruction or a particular series of instructions which, when executed, introduced or uses the sensitive data.

[0018] The programming level of the storage circuit thus at least approximately represents the number of partial programming operations performed, and therefore the number of uses of the element of the integrated circuit. The maximum number of permitted uses is defined for example by the user. With the rate of use of the element being known, the user may then act preventively if necessary, for example by blocking the operation of the element of the integrated circuit, modifying the value of the sensitive data, or modifying the mechanism for the production of the sensitive data.

[0019] According to a preferred embodiment, the circuit is complemented by a measurement circuit to measure the level of programming of the storage circuit and produce a warning signal if this level reaches a reference level representing a maximum number of permitted uses of the sensitive element. The user is thus directly informed by the warning signal if the number of permitted uses is exceeded.

[0020] According to the chosen embodiment of the invention, the use detection circuit may possibly be less precise than a counter, as shall be seen hereinafter. However, in any case, the detection circuit of the invention gives an accurate estimation of the number of uses of the element or elements, for example with an accuracy of within 5 or 10 percent, and this estimate is sufficient to enable the user to take preventive action.

[0021] According to one embodiment of the invention, the storage circuit comprises at least one programmable storage cell working by partial programming steps. The storage cell may be for example of the EEPROM, EPROM or FLASH type.

[0022] The use detection circuit of the invention is thus more reliable than a circuit with a counter because, unlike a counter, the circuit of the invention cannot be reset in a simple way. Indeed, the contents of a storage cell cannot be erased in a simple way. The detection circuit of the invention therefore keeps a trace, in time, of the use of the element of the integrated circuit to which it is connected.

[0023] Furthermore, the detection circuit of the invention is far smaller than the commonly used circuits which comprise a counter, because a storage cell is far smaller in size.

[0024] The detection circuit according to the invention advantageously has a complementary output circuit to store the warning signal produced by the measurement circuit. The user can therefore know at all times whether a warning signal has been sent by the measurement circuit, simply by verifying the contents of the output circuit.

[0025] According to one embodiment, the storage circuit has several storage cells used successively as and when the element is used. A storage cell is used when a previous storage cell has reached a maximum level, so that the programming level of the last programmed storage cell added to the maximum level of the previous already programmed cell or cells represents the number of uses of the element.

[0026] According to another embodiment, the storage circuit comprises several storage cells, each storage cell being used to store the number of uses of the sensitive element of the integrated circuits associated with said storage cell, so that the programming level of each storage cell represents the number of uses of the sensitive element that is associated with it.

[0027] The detection circuit according to the invention is furthermore advantageously complemented by disabling means to disable the operation of the programming circuit, thus limiting the power consumption of the use detection circuit.

[0028] An object of the invention is also a method for the detection of the use of a sensitive element of an integrated circuit, the method comprising a partial programming step of an electrically programmable non-volatile storage circuit, performed when the sensitive element is used, so as to gradually modify the programming level of the storage circuit as and when the sensitive element is used.

[0029] Thus, whenever an element of the integrated circuit is used, a partial, and preferably slow, programming of the storage circuit is performed by the programming circuit. In this way, a few additional electrical charges collect in the storage circuit and its programming level increases at each programming operation, namely at each use of the element of the integrated circuit.

[0030] According to one embodiment of the method of the invention, the partial programming steps performed are identical at each use of the sensitive element. The term “identical steps” must be understood here to refer to steps having identical parameters, such as for example a duration or a quantity of energy given to the storage circuit. In this case, the programming level of the storage circuit is directly proportional to the number of uses of the element; it therefore gives a fairly precise indication of the number of real uses of the element.

[0031] According to another embodiment of the method, parameters of a partial programming step vary as and when the sensitive element is used. It is possible for example to obtain variations in the duration of a step or in the quantity of energy given during a programming step as a function of the number of uses already made, in order to give greater importance to the first or last uses of the element.

[0032] In certain cases, it is desirable to protect an integrated circuit comprising at least two sensitive elements or else an integrated circuit comprising one sensitive element that uses or produces at least two sensitive data elements. Preferably, a storage circuit comprising one or more storage cells will be chosen for this purpose.

[0033] In the case of the use of several storage cells, it is possible to associate a storage cell with the use of a single sensitive element. It is also possible to associate a storage cell with the use of single sensitive element producing or using a single sensitive data element.

[0034] In the case of the use of a storage circuit comprising a single storage cell, partial programming steps are performed at each use of one of the sensitive elements (or at each use of one of the sensitive elements associated with one and the same sensitive data element), where the parameters of a programming step may be variable as a function of the sensitive element used and/or of the sensitive data used by said sensitive element.

[0035] This is especially valuable if the sensitive element produces or uses sensitive data having different degrees of importance, or data that is more or less easily detectable from the outside. In the same spirit, the method can be used in the case of an integrated circuit comprising one or more sensitive elements, each sensitive element producing or using one or more sensitive data elements.

[0036] Whatever the embodiment chosen, the level of programming of the storage circuit or circuits increases, as the case may be, at a speed that is higher or lower depending on the production or use of the sensitive data element or elements by the sensitive element or elements of the integrated circuit. The programming level of either of the storage circuits represents, at least approximately, the number of partial programming steps performed, and hence on the number of uses of the element or elements of the integrated circuit.

[0037] Advantageously, the method according to the invention is complemented by a measurement step to measure the programming level of the storage circuit and produce a warning signal if said level reaches a value representing a maximum number of permitted uses of the sensitive element.

[0038] According to embodiments of the method, the measurement step is performed after each performance of a partial programming step, after the performance of a number M of programming steps, at the request of an external user or even randomly.

[0039] Advantageously, the method is further complemented by a storage step of the warning signal. A trace of the warning signal can thus be preserved.

[0040] The invention will be understood more clearly and other features and advantages shall appear from the following description of an exemplary embodiment of a use detection circuit according to the invention, the description being made with reference to the appended drawings, of which:

[0041]FIG. 1 is a functional drawing of a use detection circuit according to the invention;

[0042]FIG. 2 shows an exemplary embodiment of the circuit according to the invention,

[0043] FIGS. 3 to 5 are electronic diagrams illustrating certain elements of FIG. 2,

[0044]FIGS. 6a to 6 j are graphs of signals at different points of the diagrams of FIGS. 3 to 5, and

[0045]FIG. 7 is the drawing of a possible improvement of the circuit of FIG. 2.

[0046] The use detection circuit 100 of FIG. 1 comprises a programming circuit 110, a non-volatile electrically programmable storage circuit 116 formed by one or more storage cells, and a measurement circuit 120. The circuit 100 is installed in an integrated circuit, one or more sensitive elements of which are to be protected against excessive use. Its general principle of operation has been explained here above and may be summarized briefly here.

[0047] At each use of a sensitive element associated with the use detection circuit, the circuit 100 carries out a partial programming of the circuit 116 so that the programming level of the circuit 116 represents the number of uses already made of the sensitive element.

[0048] The circuit 120 measures the programming level of the circuit 116 and produces a warning signal VOUT if this level goes beyond a reference level representing a maximum number of authorized uses of the sensitive element. The circuit 120 can be activated for example after each programming of the circuit 116, every M programming operations (where M is an integer, for example equal to 10) of the circuit 116 or else randomly.

[0049] As seen here above, the programming level can be measured after each partial programming, after a number M of partial programming operations, at the user's request or else randomly.

[0050]FIG. 2 shows an exemplary embodiment of a use detection circuit 100 used to carry out, at each use of an element, a partial programming of the storage circuit, which is identical at each use of the element, and then to carry out a reading of the storage circuit.

[0051] The use detection circuit 100 of FIG. 2 comprises a programming circuit 110, a storage circuit 116, a measurement circuit 120 and a control circuit 130.

[0052] The programming circuit 110 comprises two supply input terminals 111, 112 to which there are respectively applied a supply potential VCC and a programming potential VPP, and two selection input terminals 113, 114 to which there are respectively applied a disabling signal SELECT and a programming signal SWITCH. The circuit 110 gives a control potential VG at an output terminal 115. This control potential VG assumes three values as a function of the signals SELECT and SWITCH:

[0053] VG=VPP if SELECT=1 and SWITCH=1,

[0054] VG=VCC if SELECT=1 and SWITCH=0, and

[0055] VG=0V if SELECT=0

[0056] The circuit 116 is formed, in the example of FIG. 2, by a single EEPROM type storage cell formed by a floating-gate type storage transistor T1: this transistor T1 has a gate connected to the output terminal 115 of the switch 110, a source connected to a ground of the circuit and a drain.

[0057] The measurement circuit 120 has a power supply input terminal 121 to which the supply potential VCC is applied, a control input terminal 122 to which a measurement signal SENSE is applied and an input terminal 123 connected to the drain of the transistor T1.

[0058] When the circuit 120 receives the read signal SENSE, it compares a current ICELL flowing in the channel of the storage transistor T1 with a reference current IREF and, at an output terminal 125, it gives an warning signal VOUT whose state represents the value of the current ICELL as compared with that of the reference current IREF.

[0059] The control circuit 130 comprises an input terminal 131 to which a use-indicating signal EVENT is applied, an input terminal 132 to which a clock signal CP is applied, two output terminals 133, 134 respectively connected to the input terminals 113, 114 of the circuit 110 and an output terminal 135. The circuit 130 gives, respectively at the terminals 133, 134, 135, the control signals SELECT, SWITCH, SENSE as a function of the signal EVENT.

[0060] In the example shown in FIG. 2, it is assumed that the signal EVENT is given in the form of a pulse by an element (such as an arithmetic and logic unit, a multiplication circuit, an encryption circuit, etc.) of the integrated circuit. More generally, the signal EVENT is given by an element (or a part of an element) that directly produces or uses a sensitive data or else by a control circuit that drives the element producing or using the sensitive data. It can also be given by an element when it executes a particular instruction or a particular series of instructions possibly implementing the data to be protected.

[0061] The full operation of the use detection circuit of FIG. 2 is as follows.

[0062] When the circuit 130 receives a pulse EVENT indicating that the element whose use is to be detected is used, it then gives signals SELECT, SENSE respectively equal to 1 and 0 and a potential VG equal to VPP is applied to the gate of the transistor T1. A partial programming of the transistor T1 is performed and its programming level is raised accordingly.

[0063] The circuit 130 then gives signals SELECT, SENSE, both equal to 1. The circuit 120 then measures the programming level of the storage transistor T1 in measuring the current ICELL flowing in the channel of the transistor T1. If ICELL is smaller than or equal to the reference current IREF, then the signal VOUT is equal to 1. Conversely, if ICELL is greater than IREF, then the signal VOUT is equal to 0 (it may be recalled that the current flowing in an EEPROM type storage cell is inversely proportional to its programming level).

[0064] The programming circuit 110 comprises, according to the drawing of FIG. 3, six transistors T2 to T7 and one controlled switch 140.

[0065] The switch 140 has two terminals 141, 142 and one control input terminal 143 respectively connected to the input terminals 111, 112 and 114 of the circuit 110. At an output terminal 144, the switch 140 gives a potential VHT which has the following characteristics:

[0066] VHT=VPP if SWITCH=1, and

[0067] VHT=VCC if SWITCH=0.

[0068] The transistor T2 is of the P type; its source is connected to the terminal 111 of the circuit 110 and its drain is connected to the drain of the N type transistor T3, the source of which is connected to the ground of the circuit. The control gates of the transistor T2, T3 are connected together to the input 113 to receive the signal SELECT. The transistors T2, T3 form a logic inverter. At their drain, they give a signal that is the reverse of the signal SELECT.

[0069] The transistor T4 is an N type transistor. Its drain and its gate are respectively connected to the drain and to the source of the transistor T2. The transistor T5 is a P type transistor whose drain and source are connected respectively to the source of the transistor T4 and to the terminal 144 of the switch 140.

[0070] The transistor T6 is a P type transistor. It source is connected to the terminal 144 of the switch 140 and its drain is connected to the drain of the N type transistor T7, the source of which is connected to the ground of the circuit. The drains of the transistor T6, T7 are connected together to the gate of the transistor T5 and to the output terminal 115 and their control gates are connected together to the drain of the transistor T4. The transistor T6, T7 form a high-voltage inverter. At their drain, they give a potential VG that is equal to the potential VHT if a zero potential is applied to their control gates, and they give a potential VG that is equal to a zero potential at their drain if a potential equal to the potential VCC is applied to their gate.

[0071] The measurement circuit 120, according to the drawing of FIG. 4, has seven transistors T8 to T14, two inverters I1, I2 and one bias potential source 145.

[0072] In the example shown, the transistor T8 is considered to have a size identical to that of the transistor T1, the source of which is connected to the ground of the circuit and the control gate of which is connected to the positive terminal of the source 145, the negative terminal of which is grounded. The source 145 gives a given bias potential VREF at the gate of the storage transistor T8; a given bias current IREF then flows between the drain and the source of T8.

[0073] In the example illustrated, a transistor T8 has been chosen with a size identical to that of the transistor T1. The potential VREF of the bias source 145 is chosen in such a way that, when the potential VREF is applied to the gate of the transistor T8, the current IREF flowing in the drain of T8 is equal to the current flowing across a transistor identical to T8 which has undergone about N partial programming steps with a potential equal to VPP at its gate.

[0074] Other choices are possible: for example, T1 could be taken to have a size N times the size of T8. This enables the direct comparison of the currents, in taking account of the scale factor, without having to use a large-sized transistor T8. Indeed, if it is sought to have the ability to count up a large number of uses on the transistor T1, it will be necessary to use a transistor T1 with a larger-sized floating gate so as not to quickly reach the maximum programming level of the transistor. In this case, a potential VREF will be chosen such that, when it is applied to the gate of T8, the current IREF flowing in the drain of T8 is equal to the current flowing across a transistor identical to T8 which has undergone a single programming step.

[0075] It is still possible to use several storage cells in succession.

[0076] More generally, the choice of the transistor T1 of a storage cell, the transistor T8 of the circuit 120 and the source 145 is a function especially of the:

[0077] maximum number of uses permitted,

[0078] parameters for performing the partial programming operations: duration, quantity of charges supplied, etc.,

[0079] parameters for performing different partial programming operations according to the circuit element used, should the activity of several elements be detected with a same detection circuit 100,

[0080] the number of storage cells used,

[0081] etc.

[0082] The transistors T9, T10 are N type transistors having their control gates connected together to the terminal 122 of the circuit 120. The source of the transistor T9 is connected to the terminal 123 and the source of the transistor T10 is connected to the drain of the transistor T8. The transistors T9, T10 disable the operation of the circuit 120 when the signal SENSE is inactive.

[0083] The transistors T11, T12 are N type transistors. The source of the transistor T11 is connected to its gate by means of the inverter I1 and to the drain of the transistor T9. The source of the transistor T12 is connected to its gate by means of the inverter I2 and to the drain of the transistor T10. The transistors T11, T12 have the function of keeping the potentials at the drains of the transistors T13, T14 constant whatever the value of the currents IREF, ICELL.

[0084] The transistors T13, T14, forming a current mirror, are P type transistors whose sources are connected together to the input terminal 121 to receive the potential VCC and whose gates are connected together to the drain of the transistor T13. The drain of the transistor T14 is connected to the drain of the transistor T12 and the terminal 125.

[0085] In the example of FIG. 4, the control circuit 130 comprises four D type latch circuits 151, 152, 153, 154, three logic gates 155, 156, 157 and one inverter 158.

[0086] The four latch circuits each comprise one data input terminal, one clock input terminal and one data output terminal. The four latch circuits are series-connected. The data input terminal of the first latch circuit 151 is connected to the input terminal 131 to receive the signal EVENT, and the output terminal of the fourth latch circuit 154 is connected to the terminal 135 at which the signal SENSE is given. The clock inputs of the four latch circuits are connected together to the terminal 132 to receive the same clock signal CP. Each latch circuit is equivalent to a delay circuit. Indeed, at its output, each latch circuit transmits, at its output, the signal that it has already received at its input at the previous clock cycle.

[0087] The logic gate 155, which is an OR type logic gate, comprises two input terminals respectively connected to the output terminal of the latch circuit 152 and to the output terminal of the latch circuit 154. The gate 155 gives the signal SELECT at an output terminal connected to the terminal 133 of the circuit 130.

[0088] The logic gate 156, which is OR type logic gate, comprises two input terminals respectively connected to the output terminal of the first latch circuit 151 and the output terminal of the gate 155.

[0089] The logic gate 157, which is an AND type gate, comprises two input terminals respectively connected to the output terminal of the latch circuit 154 by means of the inverter 158 and to an output terminal of the gate 156. The gate 157 gives the signal SWITCH to an output terminal connected to the terminal 134 of the circuit 130.

[0090] The overall function of the circuit of FIG. 2 shall now be described with reference to FIGS. 7a to 7 h. These figures are respectively the timing diagrams of the signals CP, EVENT, SWITCH, SELECT, SENSE and of the potentials VHT, VG and VOUT at different points of the circuit 100 of FIG. 2. The circuit of FIG. 2 tells a user whether or not a maximum number N of permitted uses of an integrated circuit element has been reached.

[0091] In the example, the transistors T1, T8 are identical in size, and the source 145 is chosen accordingly as indicated earlier. In the example again, all the partial programming steps are identical, especially in terms of potentials applied to the electrodes of the transistor T1 and in terms of programming time.

[0092] Initially, the logic signals EVENT, SELECT, SWITCH, SENSE are equal to “0”, the potential VHT at the output terminal of the switch 140 is equal to VCC and the potentials VG and VOUT are zero.

[0093] The first part of the timing diagrams shows the progress of the signal when an nth pulse EVENT is received by the circuit 130, n being an integer smaller than the maximum number N.

[0094] The passage to “1” of the signal EVENT at the instant t0 causes the passage to “1” of the signal SWITCH one clock cycle CP later at the instant t1, and it causes the passage to “1” of the signal SELECT at the instant t2.

[0095] When the signal SWITCH goes to “1”, the switch 140 switches over and gives a potential VHT equal to VPP at its terminal 144. Since the signal SELECT is equal to “0”, the circuit 110 gives a zero potential VG.

[0096] When the signal SELECT goes to “1”, at the instant t2, the potential VG takes the value VPP and is applied to the control gate of the transistor T1 whose source is at a zero potential and whose drain is at a floating potential because the measurement circuit is inactive (SENSE=“0” and the transistors T9, T10 are off). Some electrical charges are stored in the floating gate of T1 during a clock cycle and its programming level rises slightly, without however going beyond a maximum value representing the number N.

[0097] At the instant t3, one clock cycle later, the signals SELECT and SWITCH go from “1” to “0”, the switch 140 switches over, the potential VHT takes the value VCC and the potential VG becomes zero. The nth partial programming of the transistor T1 is completed.

[0098] At the instant t4, the signals SENSE and SELECT go from “0” to “1”. The potential VHT is maintained at a level equal to VCC because the signal SWITCH is equal to “0”. Since the signal SELECT is equal to “1”, the potential VG takes the value VCC and is applied to the gate of the transistor T1, whose source is grounded. Since the signal SENSE is equal to “1”, the transistors T9, T10 are on and a current ICELL flows between the source of the transistor T9 and the source of the transistor T1, the current ICELL representing the programming level of the transistor T1, namely representing the number n.

[0099] The circuit 120 compares the current ICELL to the current IREF flowing in the transistor T8. Since n is smaller than N, the current ICELL is greater than the current IREF and the warning signal VOUT remains inactive.

[0100] At the instant t5, the signal SELECT goes to “0” and the potential VG returns to zero. Furthermore, the signal SENSE goes to “0”, the transistors T9, T10 go off, the current ICELL disappears and the warning signal VOUT remains inactive.

[0101] In short, when the nth pulse EVENT is received by the control circuit 130 of the detection circuit 100 at the instant t0, an nth partial programming step of the transistor T1 is performed between t2 and t3, the programming level of T1 is measured between t4 and t5, and then the measured programming level is finally compared with a reference level (associated with the number N). Since the maximum number N is not attained, the warning signal VOUT remains inactive.

[0102] The second part of the timing diagrams shows the progress of the signals when an mth pulse EVENT is received by the circuit 130, m being an integer greater than or equal to the maximum number N.

[0103] The passage to “1” of the signal EVENT at the instant θ0 causes the passage to “1” of the signal SWITCH at the instant θ1, and the passage to “1” of the signal SELECT at the instant θ2. When the signal SWITCH goes to “1” the circuit 110 gives a zero potential VG.

[0104] When the signal SELECT goes to “1”, at the instant θ2, the potential VG takes the value VPP, an mth partial programming step of the transistor T1 takes place, its programming level rises slightly and is greater than or equal to the maximum value representing the number N.

[0105] At the instant θ3, the signals SELECT and SWITCH go from “1” to “0”, the potential VHT assumes the value VCC and the potential VG becomes zero. The programming of the transistor T1 is completed.

[0106] At the instant θ4, the signals SENSE and SELECT go from “0” to “1”. The potential VHT is kept at a level equal to VCC because the signal SWITCH is equal to “0”. Since the signal SELECT is equal to “1”, the potential VG takes the value VCC. Since the signal SENSE is equal to “1”, the transistors T9, T10 are on and a current ICELL flows between the source of the transistor T9 and the source of the transistor T1. The circuit 120 compares the current ICELL with the bias current flowing in the transistor T8. Since m is greater than or equal to N, the current ICELL is lower than or equal to the current IREF and the warning signal VOUT becomes active in taking the value VCC.

[0107] At the instant θ5, the signal SELECT goes to “0” and the potential VG returns to zero. Furthermore, the signal SENSE goes to “0”, the transistors T9, T10 go off, the current ICELL disappears and the potential VOUT returns to zero.

[0108] In short, when the mth pulse EVENT is given by the detection circuit at the instant θ0, an mth programming step of the transistor T1 is performed between θ2 and θ3, and then the programming level of T1 is measured between θ4 and θ5. The measured programming level is compared with the reference level. Since the maximum level is reached (the number N is reached), the potential VOUT becomes active to indicate that the reference level has been reached or crossed, and then becomes inactive again at the instant θ6.

[0109] FIGS. 1 to 5 show a possible embodiment that in no way restricts the scope of the invention. Modifications may be made in the elements of the use detection circuit 100, without departing from the scope of the invention.

[0110] The measurement circuit 120 is used solely to read the contents of the storage circuit 116. The circuit 120 is not indispensable and may be eliminated. This is especially the case if the storage circuit is capable of activating an alarm taken into account by another element of the integrated circuit or else if it is capable of activating an interruption managed by a switching unit of the integrated circuit.

[0111] In the above example, the duration of the signals SENSE, SELECT, SWITCH especially, has been chosen to the equal to one or more cycles of the clock signal: the duration of these signals is fixed by the duration of the delays introduced by the latch circuits 151 to 154 of the circuit 130. However, these signals may have different durations. The essential point is that the signals should have a duration sufficient for the efficient and satisfactory performance of a partial programming step, or a measurement step as the case may be. Preferably however, the signal SWITCH is produced before the signal SENSE, so that the programming step is performed before the measurement step.

[0112] The frequency with which the measurement steps are performed may also be modified: it is possible not to perform the measurement step routinely after each partial programming step, but to perform a measurement step only during specific checks on the number of uses, as seen here above.

[0113] The storage circuit 116 can also be modified: similarly, it is possible to use not just one storage cell but several such cells successively as and when the partial programming steps are performed. This makes it possible, for one and the same number of uses counted up, to reduce the number of partial programming operations per storage cell and thus reduce the sizing constraints on these cells. It is also possible to envisage making the number of accepted uses parametrizable by authorizing the use of a more or less large number of the cells.

[0114] Although, in the example, we have described the use of an EEPROM type cell, it is of course possible to use cells of another type, such as FLASH type cells, and more generally any other electrically programmable storage circuit that can have its programming level modified several times by means of partial programming operations, and that enables the non-volatile storage of the counted number of uses.

[0115] Modifications can also be made to the programming circuit 110 of FIG. 3.

[0116] The circuit 100 of FIG. 2 uses a single programming potential VPP. The value of this potential fixes the quantity of charges stored in the cell 116 when carrying out a programming step of a given duration.

[0117] It is also possible to use several programming potentials VPP1, VPP2, preferably different potentials, to carry out different partial programming steps. This may be valuable especially when the integrated circuit uses several elements of different sensitivity, which are to be monitored by means of a single storage circuit. The circuit 110 of course has to be modified accordingly.

[0118] Furthermore, the transistors T2, T3 of the circuit 110 have the role of inverting the signal SELECT. They may be replaced by any other circuit capable of inverting the logic signals. Similarly, the transistors T6, T7 may be replaced by a high-voltage inverter, which gives a high potential if a zero logic signal is applied to its input, and gives a zero potential if a logic signal equal to “1” is applied to its input.

[0119] The transistor T4 is an isolation transistor that prevents the voltage at the drains of the transistors from reaching the level of the potential VPP, should the potential VPP appear at the gates of the transistors T6, T7. The transistor T4 may be eliminated if necessary. In this case, the drain of T5 and the gates of T6, T7 will be connected together to the drains of the transistors T2, T3.

[0120] The transistor T5 is a safety element used to lock the potential VG at “0V” when the signal SELECT is zero. The transistor T5 may be eliminated if necessary.

[0121] In general, the circuit 110 is a circuit that gives an output potential VG that takes three values as a function of two (or more) selection signals SELECT, SWITCH. It may be replaced by any circuit fulfilling this function.

[0122] Modifications may also be made in the read circuit 120. For example, the transistors T11, T12 and the inverter I1, I2 are used to limit the potential at the drain of the transistors T1, T8. These elements may be eliminated if the storage transistors T1, T8 are sized to withstand slightly higher potentials.

[0123] The circuit 130 of FIG. 4 is only an example of a circuit giving the signals, SELECT, SWITCH and SENSE. Other control circuits may be used, especially circuits comprising sets of gates and/or latch circuits different from the one proposed by way of an example. Furthermore, the D type latch circuits that are used as delay circuits may be replaced by any other circuit having a similar function. The essential point is that, to implement the invention, there should be a control circuit available giving signals SELECT, SWITCH and SENSE with the characteristics needed for the efficient operation of the circuits 110, 120, namely signals used to carry out, first of all, a step for partial programming of the storage circuit T1 and, if necessary, a step for measuring the level of programming of the circuit 116 and a comparison of this level with a reference level.

[0124] The circuit of FIG. 2 can also be improved by adding a circuit 160 to store the passage to “1” of the signal VOUT. A circuit 160 of this kind is shown in dashes in FIG. 2. It has an input terminal 161 connected to the terminal 125 of the circuit 120, an input terminal 162 connected to a terminal 136 of the circuit 130 to receive a write signal WRITE and an input terminal 160 to receive a control signal ENABLE from a user of the circuit.

[0125] The circuit 160 stores the value of the active or inactive signal VOUT, whenever it receives the active signal WRITE, and it gives out the previously stored value of the signal VOUT whenever it receives an active signal ENABLE.

[0126] The signal WRITE is produced by the control circuit 130 after each partial programming step, every M partial programming steps, or else randomly, depending on the embodiment of the circuit.

[0127] The signal ENABLE for its part is produced by an external user, when he wishes to know whether a warning signal has been sent or not

[0128] An exemplary circuit 160 comprises, in accordance with the drawing of FIG. 6, a latch circuit 165 and a buffer memory 166. The latch circuit 165 has a data input terminal and a clock input terminal that are connected respectively to the terminals 161, 162 of the circuit 160. The memory 166 has an input terminal connected to a data output terminal of the latch circuit 165 to receive a signal REGOUT and an input terminal connected to the terminal 163 to receive the signal ENABLE.

[0129] The signal WRITE is given by the circuit 130. In the example shown in FIGS. 2 to 6, it is equal to the signal SENSE delayed by one cycle of the clock signal. For this purpose, a fifth latch circuit 159 (shown in dashes in FIG. 5) is simply added to the circuit 130. A data input terminal of this latch circuit 159 is connected to the output terminal of the latch circuit 154 and an output terminal of this latch circuit 159 is connected to the terminal 136.

[0130] The circuit 160 works as follows. Initially, the signals WRITE, ENABLE and REGOUT are at zero. They are shown in FIGS. 7i and 7 j. At the nth pulse EVENT, when the signal SENSE goes to “0” at the instant t6, the signal WRITE goes to “1” and the signal REGOUT remains at zero because the signal VOUT is inactive. Similarly, at the mth pulse EVENT, when the signal SENSE goes to “0” at the instant θ6, the signal WRITE goes to “1”, the signal REGOUT goes to “1” and it is kept equal to “1”.

[0131] At any time, when an external signal ENABLE is received, the signal REGOUT is stored in the memory 166 and given to the exterior. 

1. Circuit (100) to detect the use of an element of an integrated circuit, characterized in that it comprises: a non-volatile electrically programmable storage circuit (116) and a programming circuit (110) to partially program said storage circuit and gradually modify its programming level as and when the element is used, so that this level represents the number of uses of the element.
 2. Circuit according to claim 1, characterized in that it comprises a measurement circuit (120) to read the level of programming of the storage circuit and produce a warning signal (VOUT) if this level reaches a reference level representing a maximum number of permitted uses of the element.
 3. Circuit according to claim 1, characterized in that the storage circuit comprises at least one programmable storage cell.
 4. Circuit according to claim 3, characterized in that the storage cell is of the EEPROM, EPROM or FLASH type.
 5. Circuit according to one of the claims 1 to 4, characterized in that the storage circuit comprises several storage cells used successively as and when the element is used, a storage cell being used when a previous storage cell has reached a maximum level, so that the level of programming of the last programmed storage cell added to the maximum level of the already programmed cell or cells represents the number of uses of the element.
 6. Circuit according to one of the claims 1 to 4, characterized in that the storage circuit comprises several storage cells, each storage cell being used to store the number of uses of an element of the integrated circuit associated with said storage cell, so that the programming level of each storage cell represents the number of uses of the element that is associated with it.
 7. Circuit according to any of the claims 1 to 6, characterized in that it comprises an output circuit (160) to store the warning signal (VOUT).
 8. Circuit according to any of the claims 1 to 7, characterized in that it also comprises a control circuit (130), to drive the working of the programming circuit, the storage circuit (116) and, possibly, the measurement circuit (120) and/or the output circuit (160), as a function of a use signal (EVENT) received, that is activated at each use of the element or elements.
 9. Circuit according to any of the claims 1 to 8, wherein the element whose use is detected is either an identification circuit or a cryptographic computation circuit of the integrated circuit or a part of one of these circuits, or an instruction, a particular sequence of instructions or a step of a method implemented by the integrated circuit.
 10. Method for the detection of the use of an element of an integrated circuit, comprising a step for partial programming of an electrically programmable non-volatile storage circuit (116), performed when the element is used, so as to gradually modify the programming level of the storage circuit as and when the element is used.
 11. Method according to claim 10, characterized in that the partial programming steps performed are identical at each use of the element.
 12. Method according to claim 10, characterized in that parameters of a partial programming step vary as a function of the number of uses already made of the element.
 13. Method according to one of the claims 10 to 12, characterized in that it is used in an integrated circuit comprising at least two elements, and in that the partial programming steps of a single cell of the storage circuit (116) are performed at each use of one of the elements, where the parameters of a programming step may be variable as a function of the element used.
 14. Method according to one of the claims 10 to 12, characterized in that it is used in an integrated circuit comprising at least two elements, a storage cell of the storage circuit (116) being associated with each element, and in that the partial programming steps of a cell of the storage circuit (116) are performed at each use of the associated element, where the parameters of a programming step may be variable as a function of the element used.
 15. Method according to one of the claims 10 to 14, characterized in that it comprises a measurement step to measure the programming level of the storage circuit (116) and produce a warning signal (VOUT) if said level reaches a value representing a maximum number of permitted uses of the element.
 16. Method according to one of the claims 10 to 15, characterized in that it also comprises a storage step performed after the measurement step to store the warning signal.
 17. Smart card characterized in that it comprises a use detection circuit according to one of the claims 1 to
 9. 